/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package com.srcptit.trainning.thompv.btvn2;
import java.util.Scanner;
/**
 *
 * @author SONY
 */
public class Bai7 {
    public static void main(String[] args)
    {
        Scanner sc=new Scanner(System.in);
        String s,s2 = null;
        System.out.println("Moi ban nhap 1 xau:");
        s=sc.nextLine();
        String s1[]=s.split(" ");
        int max=s1[0].length(),vt=0;
        for(int i=1;i<s1.length;i++)
         if(s1[i].length()>max)
         {
             max=s1[i].length();
             s2=s1[i];
             vt=i;
         }
        System.out.println("Tu dai nhat trong xau la: "+s2+" la tu thu "+(vt+1));
    }
}
